package com.chance.cc.crawler.prod.command.trigger.domain.news.baidu;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.BaiDuCommonScript;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.tieba.realtime.BaiduCarSeriesTiebaCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.news.baidu.tieba.realtime.BaiduCarSeriesTiebaSimpleCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author lt
 * @version 1.0
 * @date 2021-04-10 11:05:12
 * @email okprog@sina.com
 */
public class BaiDuCarSeriesCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {
    public static void main(String[] args) {
//        publishBaiDuCarSeriesTiebaRealtimeScheduleTriggerInfo();
        publishBaiDuCarSeriesTiebaSimpleScheduleTriggerInfo();
    }

    public static void publishBaiDuCarSeriesTiebaRealtimeScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BaiduCarSeriesTiebaCrawlerScheduleJob.publishBaiduCarSeriesTiebaCrawlerScheduleJobInfo();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BaiDuCommonScript.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 23 * ?",
                "百度贴吧月度采集任务");
    }


    public static void publishBaiDuCarSeriesTiebaSimpleScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BaiduCarSeriesTiebaSimpleCrawlerScheduleJob.publishBaiduCarSeriesTiebaCrawlerScheduleJobInfo();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BaiDuCommonScript.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "百度贴吧临时采集任务");
    }


}
